package com.jianhua.backend.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * <p>
 * 存储系统发送给用户的各种通知
 * </p>
 *
 * @author author
 * @since 2025-07-02
 */
@Getter
@Setter
@ToString
@TableName("notifications")
public class Notifications implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 通知ID
     */
    @TableId(value = "notification_id", type = IdType.AUTO)
    private Integer notificationId;

    /**
     * 接收用户ID
     */
    @TableField("user_id")
    private Integer userId;

    /**
     * 通知标题
     */
    @TableField("title")
    private String title;

    /**
     * 通知内容
     */
    @TableField("content")
    private String content;

    /**
     * 通知类型（订单状态/促销/系统通知）
     */
    @TableField("type")
    private String type;

    /**
     * 关联的业务ID
     */
    @TableField("related_id")
    private Integer relatedId;

    /**
     * 是否已读(1是/0否)
     */
    @TableField("is_read")
    private Boolean isRead;

    /**
     * 通知创建时间
     */
    @TableField("created_at")
    private Date createdAt;
}
